package org.desktop.diskutils.components.treemap.renderers;

import java.awt.Shape;
import java.awt.geom.Rectangle2D;

import prefuse.render.AbstractShapeRenderer;
import prefuse.visual.VisualItem;

/**
 * A renderer for treemap nodes. Draws simple rectangles, but defers the bounds
 * management to the layout.
 */
public class NodeRenderer extends AbstractShapeRenderer {
	private Rectangle2D m_bounds = new Rectangle2D.Double();

	public NodeRenderer() {
		m_manageBounds = false;
	}

	protected Shape getRawShape(VisualItem item) {
		m_bounds.setRect(item.getBounds());
		return m_bounds;
	}
}
